import { lazy } from "react";
import { Navigate } from 'react-router-dom'
import { FriendsO, HomeO, Search, SettingO } from '@react-vant/icons'
const Detail = lazy(() => import('../promise/Detail'))
const Home = lazy(() => import('../promise/Home'))
const MyLayout = lazy(() => import('../promise/MyLayout'))

export const tabbars = [
    {
        path: '/home',
        element: <Home />,
        title: '首页',
        icon: <FriendsO />
    }
]
export const routes = [
    {
        path: '/',
        element: <MyLayout />,
        children: [
            ...tabbars,
            {
                path: '/',
                element: <Navigate to='/home'></Navigate>
                
            }
        ]
    },
    {
        path:'/detail/:type',
        element: <Detail />,
    }
]